<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>权重的叠加</title>
    <style>
        ul li {
            color: green;
        }
        /* 复合选择器会有权重叠加的问题 */
        /* 权重虽然会叠加,但是永远不会有进位 */
        /* ul li 权重  0,0,0,1 + 0,0,0,1  =  0,0,0,2     2 */

        li {
            color: red;
        }
        /* li 的权重是 0,0,0,1    1 */

        .nav li {
            color: pink;

        }
        /* .nav li  权重    0,0,1,0  +  0,0,0,1  =  0,0,1,1    11 */
    </style>
</head>

<body>
    <ul class="nav">
        <li>大猪蹄子</li>
        <li>大肘子</li>
        <li>猪尾巴</li>
    </ul>
</body>

</html>